package com.ruoyi.file.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.file.service.OssPolicyService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.UnsupportedEncodingException;
import java.util.Map;

@RestController
@RequestMapping("/oss")
public class OssPolicyController {

    @Resource
    private OssPolicyService ossPolicyService;

    @GetMapping("/policy")
    public AjaxResult policy() throws UnsupportedEncodingException {
        Map<String,String> map = ossPolicyService.policy();
        return AjaxResult.success(map);
    }
}